import sys
from django.core.management import setup_environ
import settings
setup_environ(settings)

from register import models




if __name__ == '__main__':
    if len(sys.argv) == 2:
        event = sys.argv[1]
        models.write_csv(event,sys.stdout)
    else:
        print "you must specify exactly one event name"
